package com.hzqy.persistence.dao.zxbh;

import com.hzqy.persistence.dao.core.PersistenceDao;
import com.hzqy.web.vo.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public class ZxbhUserDao extends PersistenceDao<PmsUserVo, Integer> {
	protected final Logger LOG = LoggerFactory.getLogger(getClass());

	public int addUserCredit(UserCreditVo userCreditVo) {
		return getSqlSession().insert(this.getNamespace() + "addUserCredit", userCreditVo);
	}
	
	public int findUserCreditCount(UserCreditVo userCreditVo){
		return getSqlSession().selectOne(this.getNamespace() + "findUserCreditCount", userCreditVo);
	}
	
	public List<UserCreditVo> selectUserCreditList(Map<String,Object> map){
		return getSqlSession().selectList(this.getNamespace() + "selectUserCreditList", map);
	}
	
	public int findUserAccountCount(UserAccountVo userAccountVo){
		return getSqlSession().selectOne(this.getNamespace() + "findUserAccountCount", userAccountVo);
	}
	
	public List<UserAccountVo> selectUserAccountList(Map<String,Object> map){
		return getSqlSession().selectList(this.getNamespace() + "selectUserAccountList", map);
	}
	
	public int addUserAccount(UserAccountVo userAccountVo) {
		return getSqlSession().insert(this.getNamespace() + "addUserAccount", userAccountVo);
	}
	
	public int deleteUserAccount(int f_uaz_id) {
		return getSqlSession().update(this.getNamespace() + "deleteUserAccount", f_uaz_id);
	}
	
	public int updateUserAccount(UserAccountVo userAccountVo) {
		return getSqlSession().update(this.getNamespace() + "updateUserAccount", userAccountVo);
	}
	
	public UserAccountVo selectUserAccount(int f_uaz_id){
		return getSqlSession().selectOne(this.getNamespace() + "selectUserAccount", f_uaz_id);
	}
	
	public int findAccountZxbhWchatCount(UserAccountZxbhWchatVo userAccountZxbhWchatVo){
		return getSqlSession().selectOne(this.getNamespace() + "findAccountZxbhWchatCount", userAccountZxbhWchatVo);
	}
	
	public List<UserAccountZxbhWchatVo> selectUserAccountWchatList(Map<String,Object> map){
		return getSqlSession().selectList(this.getNamespace() + "selectUserAccountWchatList", map);
	}
	
	public int addUserAccountWchat(UserAccountZxbhWchatVo userAccountZxbhWchatVo) {
		return getSqlSession().insert(this.getNamespace() + "addUserAccountWchat", userAccountZxbhWchatVo);
	}
	
	public int deleteUserAccountWchat(int f_uazw_id) {
		return getSqlSession().update(this.getNamespace() + "deleteUserAccountWchat", f_uazw_id);
	}
	
	public int updateUserAccountWchat(UserAccountZxbhWchatVo userAccountZxbhWchatVo) {
		return getSqlSession().update(this.getNamespace() + "updateUserAccountWchat", userAccountZxbhWchatVo);
	}
	
	public UserAccountZxbhWchatVo selectUserAccountWchat(int f_uazw_id){
		return getSqlSession().selectOne(this.getNamespace() + "selectUserAccountWchat", f_uazw_id);
	}

	public int findApkUpgradeCount(ApkUpgradeVo apkUpgradeVo){
		return getSqlSession().selectOne(this.getNamespace() + "findApkUpgradeCount", apkUpgradeVo);
	}

	public List<ApkUpgradeVo> selectApkUpgradeList(Map<String,Object> map){
		return getSqlSession().selectList(this.getNamespace() + "selectApkUpgradeList", map);
	}

	public int addApkUpgrade(ApkUpgradeVo apkUpgradeVo) {
		return getSqlSession().insert(this.getNamespace() + "addApkUpgrade", apkUpgradeVo);
	}

	public int updateApkUpgrade(ApkUpgradeVo apkUpgradeVo) {
		return getSqlSession().update(this.getNamespace() + "updateApkUpgrade", apkUpgradeVo);
	}

	public int findZlxUrlCount(StatZxbhConfUrlVo statZxbhConfUrlVo){
		return getSqlSession().selectOne(this.getNamespace() + "findZlxUrlCount", statZxbhConfUrlVo);
	}

	public List<StatZxbhConfUrlVo> selectZlxUrlList(Map<String,Object> map){
		return getSqlSession().selectList(this.getNamespace() + "selectZlxUrlList", map);
	}

	public StatZxbhConfUrlVo selectzlxUrl(int f_szcu_id){
		return getSqlSession().selectOne(this.getNamespace() + "selectzlxUrl", f_szcu_id);
	}

	public int addZlxUrl(StatZxbhConfUrlVo statZxbhConfUrlVo) {
		return getSqlSession().insert(this.getNamespace() + "addZlxUrl", statZxbhConfUrlVo);
	}

	public int deleteZlxUrl(int f_szcu_id) {
		return getSqlSession().update(this.getNamespace() + "deleteZlxUrl", f_szcu_id);
	}

	public int updateZlxUrl(StatZxbhConfUrlVo statZxbhConfUrlVo) {
		return getSqlSession().update(this.getNamespace() + "updateZlxUrl", statZxbhConfUrlVo);
	}
}
